<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="com.infomanage.po.*"%>
<%@page import="com.infomanage.vo.*"%>
<%@page import="com.infomanage.service.hr.*"%>
<%@page import="com.infomanage.enums.*"%>
<%
    request.setCharacterEncoding("UTF-8");
	List<PersonItem> persons = PersonManageService.search(request,response,out);
	int personCount = persons.size();
%>
<html>
<head>
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
	<link href="../../css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript">
		function modifyItem(id) {
			var url = "personManage_edit.jsp?personId=" + id;
			var width = '1000px';
			var height ='1000px';
			var arg = "dialogHeight:" + height + ";dialogWidth:" + width + ";status:no;location:no;";
			var returnValue = window.showModalDialog(url, "", arg);
			window.location.reload();
		}

		function delItem(id) {
			if(window.confirm("确定删除吗？")){
				actionFrame.location.href = "personManage_action.jsp?actionType=del&personId=" + id;
			}
		}

	   function showError(error){
		   alert(error);
	   }

	   function showInfo(info){
		   if(info && info != "") {
		   		alert(info);
		   }
		   window.location.reload();
	   }
	</script>
</head>
<body rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0">
<form action="http://www.baidu.com"  method="post">  
<table width="100%" height="100%"  border="0" align="center" cellpadding="0" cellspacing="0" style="table-layout: fixed;background: #ffffff;">
	<tr height="29px">
        <td valign="middle" height="29px" class="td_title" style="padding-left:20px;border-right: 1px #a3c6e2 solid;">
        	请选择要发送短信的人员
        </td>
    </tr>

    <tr>
    	<td valign="top">
    		 <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="tabMain">
     		 	  <col width="10%">
    		 	  <col width="30%">
    		 	  <col width="30%">
    		 	  <col width="30%">
         		<tr class="thlist">
         			<td>
         				<a href="#" flag="none" onclick="selectAll(this, '<%=personCount%>');" title="全选/全清" style="color:#15428B;">选择</a>
         			</td>
         			<td>
			    		姓名 
			    	</td>
			    	<td>
			    		所属单位
			    	</td>
			    	<td>
			    		手机号
			    	</td>

         		</tr>
         		
         		<!-- 输出数据 -->
         		<tr valign="top">
         			<td colspan="9" width="100%">
         				<div style="width: 100%;height: 100%;overflow: auto;">
         					<table cellpadding="0" cellspacing="0" class="altColorTable">
     		 	               <col width="10%">
    		 	               <col width="30%">
    		 	               <col width="30%">
    		 	               <col width="30%">
				    		 	<%
				    		 		if(persons != null) {
				    		 			int i = -1;
				    		 			for(PersonItem personItem : persons) {
				    		 				Person person = personItem.getBean();
				    		 				Department dept = personItem.getDept();
				    		 				i++;
				    		 	%>
         						<tr class="tdlist">
         							<td>
         								<input onclick="selectItem(this);" id="selBox_<%=i%>" type="checkbox" value="<%=person.getPersonId()%>">
         							</td>
         							<td>
         								<%=person.getName()%>
         							</td>
         							<td>
         								<%=SexType.valueOf(person.getSex()).title()%>
         							</td>
         							<td>
         								<%=dept.getName()%>
         							</td>
         							<td>
         								<%=PositionType.valueOf(person.getPosition()).title()%>
         							</td>
             						<td>
         								<%=AdministrationDegreeType.valueOf(person.getAdminlevel()).title() %>
         							</td>
         							<td>
         							    <%=person.getJoinWay() %>
         							</td>

         						</tr>
				    		 	
				    		 	<%	
				    		 			}
				    		 		}
				    		 	%>
         					</table>
         				</div>
         			</td>
         		</tr>
         	 </table>
         	   
    	</td>
    </tr>
</table>

<iframe src="#" name="actionFrame" style="display: none;"></iframe>
</form>
</body>
</html>
